package Model;

/**
 * PlayerGk class represents goal keeper
 * @author Jose Filipe M Santos - 7277502
 * @author Matheus Martins Teixeira - 7277482
 */
public class PlayerGk extends Player{

    private int Reflex;
    private double Height;

    /**
     * PlayerGk's class constructor (only one)
     *
     * @param pName   Keeper's name
     * @param pAge    Keeper's age
     * @param pHab    Keeper's general hability
     * @param pRef    Keeper's reflex (specific to goal keepers)
     * @param pHeight Keeper's height in meters (specific to goal keepers)
     */
    public PlayerGk(String pName, int pAge, int pHab, int pRef, double pHeight){

        super(pName, pAge, pHab);
        this.Height = pHeight;
        this.Reflex = pRef;

    }

    /**
     * Returns the goal keeper specific hability ((height(in meters) * 200 + general hability * 5 + reflx *3 ) / 10)
     *
     * @return Goal keepe's hability
     */
    @Override
    public int getHability(){

        int Hab = super.getHability();
        return ( (((int)this.Height * 100 * 2)  + (Hab * 5) + (this.Reflex * 3)) / 10  );

    }

    /**
     * Returns the goal keeper height in meters
     *
     * @return Goal keeper height in meters
     */
    public double getHeight() {
	return Height;
    }

    /**
     * Returns the keepers reflex
     *
     * @return Goal keeper's reflex
     */
    public int getReflex() {
	return Reflex;
    }


}
